<template>
  <div>
    <!-- 表格数据渲染 -->
    <el-table border :data="list" style="width: 86.3%">
      <el-table-column label="选择" width="180">
        <template slot-scope="scope">
          <el-radio v-model="check" :label="scope.row">
            <span style="color: #fff">.</span>
          </el-radio>
        </template>
      </el-table-column>
      <el-table-column prop="name" label="图书名称" width="180">
      </el-table-column>
      <el-table-column prop="price" label="价格" width="180"> </el-table-column>
      <el-table-column prop="creator_id" label="图书分类" width="160">
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import axios from "axios";
export default {
  components: {},
  data() {
    return {
      form: {
        page: 1,
        limit: 10,
        name: "",
        book_classify_id: "",
        status: 1,
        spell_group: 1,
        integral_shop: 0,
        recommend: 0,
      },
      list: [],
      check: "",
    };
  },
  mounted() {
    axios
      .get("/books", {
        params: this.form,
      })
      .then((res) => {
        this.list = res.data.data.list;
      });
  },
  methods: {},
  computed: {},
  watch: {
    check: function (newValue) {
      this.$emit("books", newValue);
    },
  },
};
</script>
<style scoped>
</style>